1. Field of the Invention
The invention relates generally to communications between master and slave devices and more particularly to systems and methods for ensuring in-order execution of commands using execution-synchronization instructions.
2. Related Art
Modern high-performance computing systems may include multiple devices that perform the various functions of the computing system. For example, there may be multiple processors (which may act as masters, slaves, or both,) memories, input/output (I/O) devices, and the like. These different devices are typically connected to a bus to communicate with each other, transfer data, and so on. Because there may be many devices that are trying to communicate using the limited bandwidth of the bus, the communications between the devices should be as efficient as possible.
In order to support the high data bandwidth requirements in such a system, a split bus may be used. The split bus allows command and data phases of a data transaction to be decoupled. The decoupling of the command and data phases of the transaction allows multiple transactions to proceed concurrently and thereby avoids some of the latency that would otherwise be experienced in the transactions.
In a typical multi-phase transaction, a master device initiates the transaction by sending a command to a slave device via a bus. The slave device receives the command and, if the slave is able to accept the command, it sends an acknowledgment of the command to the master device. When the master device receives the acknowledgment, it knows that the command has been received and accepted by the slave. If, for example, the command is for a write transaction, the master device then puts the write data on the bus. When the slave device sees the data on the bus, it matches the data with the command and writes the data according to the command.
As noted above, this type of system allows multiple transactions to proceed concurrently. As a result, multiple commands may be sent to the slave device. The slave device therefore needs a buffer or queue in which the received (and acknowledged) commands can be stored until they can be serviced. For example, the slave device may receive several write commands before it receives data corresponding to any of the commands, so it must be able to retain the information for each command (e.g., the address to which the data will be written) until the corresponding data is received, and the transaction can be completed. It should be noted that the slave device may receive data for the commands in an order or other than the order in which the commands were received, and it can typically complete the transactions as the corresponding data is received.
In some systems, however, it may be necessary to provide a mechanism to ensure that some transactions are completed before others. One such mechanism is an execution-synchronization command. This command may be issued by a master device to ensure in-order execution of data transactions. In one embodiment, the master device may have a first set of transactions that need to be completed before a second set of transactions. In this case, the master device sends to the slave device commands for the first set of transactions, then an execution-synchronization command, then commands for the second set of transactions. Each of the commands is assumed to be acknowledged by the slave device in this order. The slave device then knows that it must complete all of the transactions in the first set (for which the commands were received prior to the execution-synchronization command) before it can begin executing any of the transactions in the second set (for which the commands were received after the execution-synchronization command.)
While this mechanism serves its intended purpose, it has the undesirable effect of increasing the amount of space required for the buffer in the slave device. Considering the example above, the slave device may receive the data corresponding to one or more of the second set of commands before it has completed all of the transactions for the first set of commands. This may be for a variety of reasons, such as the unavailability of the target to which the data is to be written. While the slave device is waiting to complete the first set of transactions, it must store the data which it has received for the second set of transactions. Thus, the slave device must have enough space to temporarily store not only the second set of commands, but also the data for these commands until it can be written to the appropriate target device.
Because a large amount of space is required to buffer data for the commands that cannot yet be executed, this can be a very expensive solution to the problem of having to perform transactions in order. This problem obviously becomes even worse when it is desired to increase the number of transactions that can be accommodated in buffer. It would therefore be desirable to provide a means for insuring in-order execution of data transactions that does not require that large amounts of data storage necessitated by the above mechanism.